package uz.gov.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * Created by IIGalytska on 03.04.14.
 */
public class ResultPage extends BasePage {
    public ResultPage(WebDriver driver) {
        super(driver);
    }

    public String getFirstLink(){

        return driver.findElement(firstLinkToSearchresult).getText();

    };


    public CartWindow pressBuyForFirstLink(){
        driver.findElement(By.name("topurchasesfromcatalog")).click();

//driver.findElement(By.className("vToolsPopupToolbar")).findElement(By.xpath("//button[contains(text(),'Ok')]")).click();

        return new CartWindow(driver);
    }








}